package cn.itsub.touchserver;

public class ServiceProvider<T> {
    private String interfaceId;
    private T ref;
    private BrokerConfig serverConfig;

    public ServiceProvider<T> setInterfaceId(String interfaceId) {
        this.interfaceId = interfaceId;
        return this;
    }

    public ServiceProvider<T> setRef(T ref) {
        this.ref = ref;
        return this;
    }

    public ServiceProvider<T> setBroker(BrokerConfig serverConfig) {
        this.serverConfig = serverConfig;
        return this;
    }

    public String getInterfaceId() {
        return interfaceId;
    }

    public T getRef() {
        return ref;
    }

    public BrokerConfig getServerConfig() {
        return serverConfig;
    }

    @Override
    public String toString() {
        return "ProviderConfig{" +
                "interfaceId='" + interfaceId + '\'' +
                ", ref=" + ref +
                ", serverConfig=" + serverConfig +
                '}';
    }

    /**
     * 发布服务
     */
    public void export() {
    }
}
